<?php
class Theme extends AppModel {

    public $validate = array(
    'name' => array('notEmpty'),
    'folder' => array('notEmpty'),
    );

    public function activate_theme($theme) {
        $this->updateAll(array('active'=>0));
        $this->updateAll(array('active'=>1),array('id'=>$theme));
    }
}
?>